<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<title></title>
		<meta charset="utf-8">
		<meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0" />
		<meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
		<meta http-equiv="Cache-Control" content="no-cache,must-revalidate" />

		<link href="../../css/skin/default/style.css" rel="stylesheet" type="text/css" />
		<link href="../../js/lib/ligerUI/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />

		<script src="../../js/lib/jquery/jquery-1.10.2.min.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/ligerui.all.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerForm.js" type="text/javascript"></script>
		<script src="../../js/lib/ligerUI/js/plugins/ligerTextBox.js" type="text/javascript"></script>
		<script src="../../js/dialog.js"></script>
		<script src="../../js/JS/jquery.md5.js" type="text/javascript"></script>
		<script src="../../js/constants.js" type="text/javascript"></script>
		<script src="../../js/api.js" type="text/javascript"></script>

		<script type="text/javascript">
			$(function() {
				$("form").ligerForm();
			});

			function f_save() {
				var pwd = $("#T_newpwd").val();
				var cpwd = $("#T_confime").val();
				if($api.isEmpty(pwd)) {
					top.$.ligerDialog.error("密码不能为空!");
					return;
				}
				if($api.isEmpty(cpwd)) {
					top.$.ligerDialog.error("密码确认不能为空!");
					return;
				}
				if($api.trim(pwd) != $api.trim(cpwd)) {
					top.$.ligerDialog.error("密码与密码确认不相符!");
					return;
				}
				var url = BaseUrl + "ChangePwd";
				var param = {
					"Oldpwd": $.md5($("#T_oldpwd").val()),
					"Newpwd": $.md5(pwd),
					"Token": $api.getStorage("token")
				}

				$api.ajax2(url, param, function(data) {
					parent.$.ligerDialog.success('密码修改成功', function() {
						parent.$.ligerDialog.close();
						parent.$(".l-dialog,.l-window-mask").remove();
					});
				});
			}
		</script>
	</head>

	<body>
		<form id="form1">
			<!--内容-->
			<div class="div-content">
				<div class="divhead">密码修改</div>
				<hr class="divline" />
				<dl> <dt>*原密码</dt>
					<dd>
						<div style="float:left">
							<input id="T_oldpwd" name="T_oldpwd" type="password" ltype="password" ligerui="{width:180}" />
						</div>
					</dd>
				</dl>
				<dl> <dt>*新密码</dt>
					<dd>
						<div style="float:left;">
							<input type="password" id="T_newpwd" name="T_newpwd" ligerui="{width:180}" validate="{required:true,minlength:4,maxlength:25,messages:{required:'请输入新密码'}}" ltype="password" />
						</div>

					</dd>
				</dl>
				<dl> <dt>*确认密码</dt>
					<dd>
						<div style="float:left">
							<input type="password" id="T_confime" name="T_confime" ligerui="{width:180}" validate="{required:true,minlength:4,maxlength:25,equalTo:'#T_newpwd',equalTo:'#T_newpwd',messages:{required:'请再次输入新密码'}}" ltype="password" />

						</div>
					</dd>
				</dl>

			</div>
		</form>
	</body>

</html>